package exp2.p3;

public class Company {
    Employee[] employeeArray;

    private double salary = 0;

    public Company(Employee[] empArr) {
        this.employeeArray = empArr;
    }

    public double getTotalSalary() {
        double totalMoney = 0;
        for (Employee employee : employeeArray) {
            totalMoney += employee.earnings();
        }
        return totalMoney;
    }
}
